# _*_ coding:utf-8 _*_
from flask_jwt_extended import JWTManager
from flask_migrate import Migrate
from app import create_app, db
from flask import render_template, send_from_directory, jsonify
from flask_cors import CORS

app = create_app('default')
CORS(app)  # 允许所有域名的跨域请求
migrate = Migrate(app, db)
jwt = JWTManager(app)


@app.errorhandler(404)
def page_not_found(error):
    """
    404
    """
    print(error)
    return "<h1>404</h1>", 404


if __name__ == '__main__':
    app.run(debug=True)
